package graph.search;

import java.util.ArrayList;

class Node {
	String id;
	boolean visited;
	int minDistance = Integer.MAX_VALUE;
	ArrayList<Node> children = new ArrayList<Node>();
	ArrayList<String> listPath = new ArrayList<String>();

	public Node(String id) {
		this.id = id;
	}

	@Override
	public boolean equals(Object obj) {
		boolean check = false;
		if (obj == null)
			return false;
		else if (obj == this)
			return true;
		else {
			if (obj instanceof Node && obj.getClass() == this.getClass()) {
				final Node t = (Node) obj;
				check = this.id.equals(t.id);
			}
		}
		return check;
	}

	@Override
	public int hashCode() {
		int hash = 7;
		hash = (37 * hash) + (null == this.id ? 0 : this.id.hashCode());
		return hash;
	}

}
